<!--# layout("/common/layout.html",{"jsBase":"/js/cms/doctoralSubsidy/"}){ -->

<form class="layui-form " id="updateForm">
    <!--# include("/cms/common/basic.html",{"basic":doctoralSubsidy}){} -->
    <!--# include("commonedit.html"){} -->
    <layui:personnelsubmitButtons id="updateButton" />
</form>
<!--#} -->
<script>
layui.use(['edit'], function(){
    var doctoralSubsidyEdit = layui.edit
    doctoralSubsidyEdit.init();

    var form = layui.form;
    form.on('select(subsidyCategory)', function (data) {
        var value = data.value;
        if(value==1){
            $("#subsidyAmount").val(100000.00);
        }else if(value==2){
            $("#subsidyAmount").val(100000.00);
        }else{
            $("#subsidyAmount").val("");
        }

    });

    form.on('select(workstationName)', function (data) {
        $.ajax({
            url: "/cms/siteFunds/findSite.do",
            data:{id:data.value},
            dataType: 'json',
            type: 'post',
            success: function (data) {
                $("#createTime").val(new Date(data.timeConstruction).format("yyyy-MM-dd"));
            }
        })
        if(data.value==""){
            $("#createTime").val("");
        }
    });
});
</script>
